package student.web.internal;

import org.zkoss.zk.ui.Desktop;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.util.DesktopInit;

import cloudspace.vm.VM;
import cloudspace.vm.io.console.CometUpdateThread;

public class CloudSpaceDesktopInit implements DesktopInit
{
	
	@Override
	public void init(Desktop desktop, Object request) throws Exception
	{
		CometUpdateThread updateThread = new CometUpdateThread(desktop);
		updateThread.start();
		Executions.getCurrent().getDesktop().setAttribute("cometThread", updateThread);

	}

}
